#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stddef.h>
struct S {
	char c1;
	int i;
	char c2;
};
#define OFFSETOF(type,member) (size_t)&(((type*)0)->member)
int main() {
	//printf("%d\n",offsetof(struct S,c1));
	//printf("%d\n", offsetof(struct S, i));
	//printf("%d\n", offsetof(struct S, c2));
	printf("%d\n", OFFSETOF(struct S, c1));
	printf("%d\n", OFFSETOF(struct S, i));
	printf("%d\n", OFFSETOF(struct S, c2));
	return 0;
}